1 module geany_d_binding.geany.plugindata; 2 3 import geany_d_binding.geany.types; 4 import gtkc.gobjecttypes: GCallback; 5 6 enum GEANY_API_VERSION = 239; 7 private const ubyte GEANY_ABI_SHIFT; 8 const uint GEANY_ABI_VERSION; 9 10 shared static this() 11 { 12 import gtk.Version; 13 14 if(Version.checkVersion(3, 0, 0) is null) 15 GEANY_ABI_SHIFT = 8; 16 else 17 GEANY_ABI_SHIFT = 0; 18 19 enum __abi_macroversion = 72; 20 21 GEANY_ABI_VERSION = __abi_macroversion << GEANY_ABI_SHIFT; 22 } 23 24 extern(System) @nogc nothrow: 25 26 import geany_d_binding.geany.app: GeanyApp; 27 28 /** This contains pointers to global variables owned by Geany for plugins to use. 29 * Core variable pointers can be appended when needed by plugin authors, if appropriate. */ 30 struct GeanyData 31 { 32 GeanyApp *app; /**< Geany application data fields */ 33 GeanyMainWidgets *main_widgets; /**< Important widgets in the main window */ 34 GPtrArray *documents_array; 35 GPtrArray *filetypes_array; 36 GeanyPrefs *prefs; /**< General settings */ 37 GeanyInterfacePrefs *interface_prefs; /**< Interface settings */ 38 GeanyToolbarPrefs *toolbar_prefs; /**< Toolbar settings */ 39 GeanyEditorPrefs *editor_prefs; /**< Editor settings */ 40 GeanyFilePrefs *file_prefs; /**< File-related settings */ 41 GeanySearchPrefs *search_prefs; /**< Search-related settings */ 42 GeanyToolPrefs *tool_prefs; /**< Tool settings */ 43 GeanyTemplatePrefs *template_prefs; /**< Template settings */ 44 gpointer *_compat; /* Remove field on next ABI break (abi-todo) */ 45 GSList *filetypes_by_title; 46 GObject *object; 47 } 48 49 struct GeanyMainWidgets; 50 struct GPtrArray; 51 struct GeanyPrefs; 52 struct GeanyInterfacePrefs; 53 struct GeanyToolbarPrefs; 54 struct GeanyEditorPrefs; 55 struct GeanyFilePrefs; 56 struct GeanySearchPrefs; 57 struct GeanyToolPrefs; 58 struct GeanyTemplatePrefs; 59 struct GSList; //TODO 60 struct GObject; //TODO 61 62 /** Callback array entry type used with the @ref plugin_callbacks symbol. */ 63 struct PluginCallback 64 { 65 /** The name of signal, must be an existing signal. For a list of available signals, 66 * please see the @link pluginsignals.c Signal documentation @endlink. */ 67 const(gchar)* signal_name; 68 /** A callback function which is called when the signal is emitted. */ 69 GCallback callback; 70 /** Set to TRUE to connect your handler with g_signal_connect_after(). */ 71 gboolean after; 72 /** The user data passed to the signal handler. If set to NULL then the signal 73 * handler will receive the data set with geany_plugin_register_full() or 74 * geany_plugin_set_data() */ 75 gpointer user_data; 76 }